<%--
  Created by IntelliJ IDEA.
  User: CY
  Date: 2018/4/10
  Time: 19:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%  String point=(String) request.getSession().getAttribute("coordinatePoint");%>
<html>
<head>
    <title>地图</title>
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
    <meta http-equiv="Expires" content="0" />
    <meta http-equiv="X-UA-Compatible" content="IE=8,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=0.3, user-scalable=0, minimum-scale=0, maximum-scale=5.0,user-scalable=yes">
    <link rel="stylesheet" href="/css/base.css">
    <link rel="stylesheet" href="/lib/layer/skin/default/layer.css">
    <script src="/lib/jQuery-File-Upload-master/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/base/base.js"></script>
    <script type="text/javascript" src="/lib/layer/layer.js?20201106"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=YECw4heQ9wzy7RKg8OW9QLMsySKzQRan"></script>
    <script src="/js/street/map.js"></script>
    <style>
        #del{
            font-size: 14px;
            padding: 5px 14px;
            border-radius: 6px;
            background: #0090e3;
            color: #fff;
            cursor: pointer;
            text-decoration: none;
            margin-top: 6px;
        }
        html{height:100%}
        body{height:100%;margin:0px;padding:0px}
        .head{height:50px}
        #map{width:100%;height:calc(100% - 100px)}

        .header{
            width:100%;
            height:45px;
            border-bottom:1px solid #9E9E9E;
            /*position:fixed;*/
            /*top:0px;*/
            /*left:0px;*/
            background: #fff;
            z-index: 10;
        }
        .nav{
            overflow:hidden;
        }
        .nav li{
            height:28px;
            line-height:28px;
            float:left;
            font-size:14px;
            margin-left:20px;
            margin-top:6px;
            cursor:pointer;
        }
        .space{
            width:2px;
            margin-left:16px;
        }
        .pad{
            padding:3px 10px;
            line-height:28px;
        }
        .select{
            background-color:#2F8AE3;
            color:#fff;
            border-radius:20px;
            -webkit-border-radius:20px;
            -moz-border-radius:20px;
            -o-border-radius:20px;;
            -ms-border-radius:20px;
        }
        .tableTitle span{
            font-size:22px;
            color:#494d59;
            padding-left:20px;
        }

        .outer{
            width:119px;
            height:43px;
            position:absolute;
            background-size:100% ;
            z-index: 99999;
        }
        .txt{
            color:#fff;
            font-size:14px;
            display: inline-block;
            width:73px;
            text-align: center;
            line-height: 36px;
            padding-left:40px;
            padding-top: 4px;
            word-break: break-all;
            text-overflow: ellipsis;
            display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/
            -webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
            -webkit-line-clamp: 1; /** 显示的行数 **/
            overflow: hidden;  /** 隐藏超出的内容 **/
        }



        .qiyeType{
            top:13%;
            right:1%;
            position: fixed;
            width: 135px;
            height: 220px;
            z-index:100;
        }
        .qiyeType .two{
            width: 96%;
            background: url(/img/grid/btnxuanzhong.png) no-repeat;
            background-size: 100% 100%;
            -ms-behavior: url(/css/main/backgroundsize.min.htc);
            behavior: url(/css/main/backgroundsize.min.htc);
            height: 34px;
            line-height: 34px;
            margin-top: 10px;
            cursor: pointer;
            color: #fff;
            text-align: center;
            font-size: 14px;
        }
        .qiyeType .active{
            background: url(/img/grid/activexuanzhong.png) no-repeat;
        }


        .qiyeType .two:hover{
            background: url(/img/grid/activexuanzhong.png) no-repeat;
        }
        .clearfx{
            width:100%;
            line-height: 50px;
            font-size:14px;
            /*height: 50px;*/
        }
        .cont{
            border-bottom: 1px dashed #eeeeee;
            width:80%;
            /*height:50px;*/
            /*margin-left: 40px;*/
            float:left
        }
        .left{
            /*width:30%;*/
            /*float:left;*/
            text-align: right;
            margin-left:3px;
        }
        .right{
            width:64%;
            /*float:left;*/
            text-align: left;
            margin-left:5%;
        }
        .img{
            float:left;
            vertical-align: middle;
            margin-top: 15px;
            margin-left:20px;
        }
    </style>
</head>
<body>
<div class="party header">
    <ul class="nav">
        <li url="/street/lajitong" data-type="0">
            <span class="select pad">党支部</span>
            <img class="space" src="../../img/twoth.png" alt="">
        </li>
        <li style="margin-top:5px;" url="/street/zhandian" data-type="2">
            <span class="pad">党员</span>
            <img class="space" src="../../img/twoth.png" alt="">
        </li>
        <li style="margin-top:8px;" url="/street/zhandian" data-type="1">
            <span class="pad">宣传阵地</span>
        </li>

    </ul>
</div>
<div class="city header" style="display: none">
    <ul class="nav">
        <li url="/street/lajitong" data-type="3">
            <span class="select pad">环保设施</span>
            <img class="space" src="../../img/twoth.png" alt="">
        </li>
        <li style="margin-top:8px;" url="/street/zhandian" data-type="4">
            <span class="pad">动态监管台账</span>
        </li>
    </ul>
</div>
<div class="zongzhi header" style="display: none">
    <ul class="nav">
        <li url="/street/lajitong" data-type="0">
            <span class="select pad">出租屋</span>
            <img class="space" src="../../img/twoth.png" alt="">
        </li>
        <li style="margin-top:5px;" url="/street/zhandian" data-type="1">
            <span class="pad">基础数据</span>
            <img class="space" src="../../img/twoth.png" alt="">
        </li>
        <li style="margin-top:8px;" url="/street/zhandian" data-type="2">
            <span class="pad">布控点位</span>
            <%--<img class="space" src="../../img/twoth.png" alt="">--%>
        </li>
    </ul>
</div>
<div class="safe header" style="display: none">
    <ul class="nav">
        <li url="/street/lajitong" data-type="0">
            <span class="select pad">企业信息</span>
            <%--<img class="space" src="../../img/twoth.png" alt="">--%>
        </li>
    </ul>
</div>
<div class="sheshi qiyeType" style="display: none">
    <ul class="qiye">
        <li class="two active" data-type="01">油烟在线检测</li>
        <li class="two" data-type="02">微型站点监测</li>
    </ul>
</div>
<div class="taizang qiyeType" style="display: none">
    <ul class="qiye">
        <li class="two active" data-type="01">餐饮企业</li>
        <li class="two" data-type="02">开墙打洞</li>
        <li class="two" data-type="03">开墙打洞(经营)</li>
        <li class="two" data-type="04">汽修企业</li>
        <li class="two" data-type="05">在建工地</li>
        <li class="two" data-type="06">门前三包</li>
        <li class="two" data-type="07">无证无照</li>
    </ul>
</div>
<div class="basic qiyeType" style="display: none">
    <ul class="qiye">
        <li class="two active" data-type="01">社区居委会</li>
        <li class="two" data-type="02">车棚</li>
        <li class="two" data-type="03">群防群治布控点位</li>
        <li class="two" data-type="04">巡逻警务站点</li>
        <li class="two" data-type="05">电子显示屏</li>
        <li class="two" data-type="06">视频监控系统</li>
        <li class="two" data-type="07">物业公司</li>
        <li class="two" data-type="08">变电站</li>
    </ul>
</div>
<div class="qiyeLei qiyeType" style="display: none">
    <ul class="qiye">
        <li class="two active" data-type="01">合格达标</li>
        <li class="two" data-type="02">一般隐患</li>
        <li class="two" data-type="03">突出隐患</li>
        <li class="two" data-type="04">严重隐患</li>
    </ul>
</div>


<div style="height: 50px;line-height: 50px;text-align: center;">
    <div style="margin-left:50px;float: left">
        <input type="text" id="suggestId" size="20" value="" style="width:200px;margin-bottom: 10px;margin-top: 6px;height:28px;border-radius: 3px;"
               placeholder="请输入地址检索"/>
        <a href="javascript:void(0);" id="del" style="" onclick="document.getElementById('suggestId').value=''">清除</a>
    </div>

</div>
<!--<div id="r-result">请输入地址检索：</div>-->
<div id="searchResultPanel" style="border:1px solid #C0C0C0;width:150px;height:auto; display:none;"></div>
<!--用于即时搜索提示-->
<div id="map"></div><!--用于放置地图-->
<script>
    var type=$.GetRequest().type;
    var map = new BMap.Map("map");
    //设置中心点坐标
  //  var point = new BMap.Point(116.669862,40.116349);
    var point = new BMap.Point(<%=point%>>);


    //初始化地图
    /**
     *地图类型：
     *普通地图：BMAP_NORMAL_MAP
     *卫星地图：BMAP_HYBRID_MAP
     */
    var map = new BMap.Map("map", {mapType: BMAP_NORMAL_MAP, minZoom: 1, maxZoom: 18});
    //设置地图类型及最小最大级别

    var marker = new BMap.Marker(point); //将点转化成标注点
//    map.addOverlay(marker);  //将标注点添加到地图上
    //添加地图类型控件
    map.addControl(new BMap.MapTypeControl({
        mapTypes:[
            BMAP_NORMAL_MAP,
            BMAP_HYBRID_MAP
        ]}));

    //设置地图级别（1-18）
    map.centerAndZoom(point, 16);
    //开启滚轮缩放地图
    map.enableScrollWheelZoom();

//    绘制网格
    function draw(){
        var poy = new BMap.Polygon([
            new BMap.Point(116.651371,40.12394),
            new BMap.Point(116.657909,40.102739),
            new BMap.Point(116.666367,40.1028),
            new BMap.Point(116.667796,40.096726),
            new BMap.Point(116.696597,40.096584),
            new BMap.Point(116.693515,40.121946)
        ], {strokeColor:'blue', fillOpacity: 0.1 , strokeWeight:1, strokeOpacity:1});  //创建多边形
        map.addOverlay(poy);

        $.ajax({
            url:'/gridInfo/gridSettingsTree',
            dataType:'json',
            data:{deptId:0,
                typeId:0},
            success:function(res){
                var data=res.obj;
                var grid=[];
                for(var i=0;i<data.length;i++){
                    var gridLocation = data[i].mapInfo;
                    var gridNum =data[i].gridId;

                    if(gridLocation != "" && gridLocation != undefined){
                        var arr = gridLocation .split('|');
                        var polygon = new BMap.Polygon(function(){
                            var arrTwo=[];
                            for(var j=0;j<arr.length;j++){
                                var type =arr[j].split(',')
                                var no=new BMap.Point(type[0],type[1]);
                                arrTwo.push(no)
                            };
                            return arrTwo;
                        }(), {strokeColor:'#000',fillColor:'red', fillOpacity: 0.3,  strokeWeight:1, strokeOpacity:0.5});  //创建多边形
                        map.addOverlay(polygon);
                        polygon.title=data[i].deptName;
                        polygon.tel=data[i].telNo;
                        polygon.name=data[i].directorName;
                        polygon.gridName=data[i].gridUserIdName;
                        polygon.scope=data[i].scope;
                        polygon.location=data[i].location;




                        polygon.addEventListener('click',function(){
                            var title=this.title;
                            var tel=this.tel;
                            var name=this.name;
                            var gridName=this.gridName;
                            var scope=this.scope;
                            var location=this.location;

                            layer.open({
                                type:1,
                                title: [title, 'background-color:#2b7fe0;color:#fff;'],
                                area: ['350px', '720px'],
                                btn: 0,
                                content:'<ul>' +
                                '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">社区名称:</span><span class="right">'+check(title) +'</span></div></li>' +
                                '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">社区电话:</span><span class="right">'+check(tel)+'</span></div></li>' +
                                '<li class="clearfx"><img src="/img/newjdy.png" alt="" class="img"><div class="cont"><span class="left">网格监督员:</span><span class="right">'+check(name) +'</span></div></li>' +
                                '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">网格监管员:</span><span class="right">'+check(name) +'</span></div></li>' +
                                '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">网格巡查员:</span><span class="right">'+check(gridName) +'</span></div></li>' +
                                '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">社区描述:</span><span class="right">'+check(scope) +'</span></div></li>' +
                                '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">居委会位置:</span><span class="right">'+check(location) +'</span></div></li>' +
                                '</ul>'
                            })
                        })

                    }
                }


            }
        })
    }
//    draw();





    // 编写自定义函数,创建标注
    function addMarker(point,myIcon){
        var marker = new BMap.Marker(point,{icon:myIcon});
        map.addOverlay(marker);
//        var convertor = new BMap.Convertor();
//        convertor.translate(point,0,translateCallback);
    }

    function translateCallback(point1){
        var marker1 = new BMap.Marker(point1);
        map.addOverlay(marker1);
        map.setCenter(point1);
    }


    //    搜索
    function G(id) {
        return document.getElementById(id);
    }

    var ac = new BMap.Autocomplete(    //建立一个自动完成的对象
        {
            "input": "suggestId"
            , "location": map
        });

    ac.addEventListener("onhighlight", function (e) {  //鼠标放在下拉列表上的事件
        var str = "";
        var _value = e.fromitem.value;
        var value = "";
        if (e.fromitem.index > -1) {
            value = _value.province + _value.city + _value.district + _value.street + _value.business;
        }
        str = "FromItem<br />index = " + e.fromitem.index + "<br />value = " + value;

        value = "";
        if (e.toitem.index > -1) {
            _value = e.toitem.value;
            value = _value.province + _value.city + _value.district + _value.street + _value.business;
        }
        str += "<br />ToItem<br />index = " + e.toitem.index + "<br />value = " + value;
        G("searchResultPanel").innerHTML = str;
    });

    var myValue;
    ac.addEventListener("onconfirm", function (e) {    //鼠标点击下拉列表后的事件
        var _value = e.item.value;
        myValue = _value.province + _value.city + _value.district + _value.street + _value.business;
        G("searchResultPanel").innerHTML = "onconfirm<br />index = " + e.item.index + "<br />myValue = " + myValue;

        setPlace();
    });

    function setPlace() {
//        map.clearOverlays();    //清除地图上所有覆盖物
        function myFun() {
            var pp = local.getResults().getPoi(0).point;    //获取第一个智能搜索的结果
            map.centerAndZoom(pp, 18);
//            map.addOverlay(new BMap.Marker(pp));    //添加标注
        }

        var local = new BMap.LocalSearch(map, { //智能搜索
            onSearchComplete: myFun
        });
        local.search(myValue);
    }

    function showInfo(thisMarker,point) {
//        console.log(point)
        //获取点的信息
        var sContent =
            '<ul style="margin:0 0 5px 0;padding:0.2em 0">'
            +'<li style="line-height: 26px;font-size: 15px;">'
            +'<span style="width: 50px;display: inline-block;">id：</span>' + point.pId + '</li>'
            +'<li style="line-height: 26px;font-size: 15px;">'
            +'<span style="width: 50px;display: inline-block;">名称：</span>' + point.communityName + '</li>'
            +'<li style="line-height: 26px;font-size: 15px;"><span style="width: 50px;display: inline-block;">查看：</span></li>'
            +'</ul>';
        var infoWindow = new BMap.InfoWindow(sContent); //创建信息窗口对象
        thisMarker.openInfoWindow(infoWindow); //图片加载完后重绘infoWindow
    }


    //        1\定义构造函数
    function ComplexCustomOverlay(point,img,name,id,con,grid,type,title){
        this._point = point;
        this._img = img;
        this._name = name;
        this._id = id;
        this._con = con;
        this._grid = grid;
        this._type = type;
        this._title = title;

    }
    // 继承API的BMap.Overlay
    ComplexCustomOverlay.prototype = new BMap.Overlay();
    //2、初始化自定义覆盖物实现初始化方法
    ComplexCustomOverlay.prototype.initialize = function(map){
        // 保存map对象实例
        this._map = map;
        // 创建div元素，作为自定义覆盖物的容器
        var div = this._div = document.createElement("div");
        div.style.backgroundImage = 'url('+this._img+')'
        div.setAttribute('class','outer');
        div.setAttribute('name',this._name);
        div.setAttribute('id',this._id);
        div.setAttribute('content',this._con);
        div.setAttribute('grid',this._grid);
        div.setAttribute('type',this._type);
        div.setAttribute('title',this._title);

        div.innerHTML= '<span class="txt">'+this._con+'</span>'
        // 将div添加到覆盖物容器中
        map.getPanes().labelPane.appendChild(div);
        //getPanes(),返回值:MapPane,返回地图覆盖物容器列表  labelPane呢???
        // 需要将div元素作为方法的返回值，当调用该覆盖物的show、
        // hide方法，或者对覆盖物进行移除时，API都将操作此元素。
        return div;
    }
    //3、绘制覆盖物
    // 实现绘制方法
    ComplexCustomOverlay.prototype.draw = function(){
        var _map = this._map;
//            var marker = new BMap.Marker(_map);
//            map.overlayPixelToPoint(this._point);
        var pixel = map.pointToOverlayPixel(this._point);
        this._div.style.left = pixel.x - 50 + "px";
        this._div.style.top  = pixel.y - 20 + "px";
    }

    function check(name){
        if(name == undefined){
            return ''
        }else{
            return name
        }
    }

    //                    点击事件
    $(document).on('click','.outer',function(e){

        e.stopPropagation()
        var type = $(this).attr('type');
        var id = $(this).attr('id');
        var name = $(this).attr('name')
        if(type == 1){ //组织架构
            $.get('/orgDepartment/queryByIdOrgDepartmentWithBLOBs',{deptId:id},function(res){
                var data= res.data;
                layer.open({
                    type:1,
                    title: ['党支部', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">组织名称:</span><span class="right">'+check(data.orgDeptName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">&nbsp;&nbsp;&nbsp;地址:</span><span class="right">'+check(data.orgDeptAddress)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">组织管理员:</span><span class="right">'+check(data.orgOrgAdmin) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 2){ //党员
            $.get('/OrgPartyMember/selectList',{opId:id},function(res){
                var data= res.obj[0];

                layer.open({
                    type:1,
                    title: ['党员', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '420px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/fr.png" alt="" class="img"><div class="cont"><span class="left">姓名:</span><span class="right">'+check(data.name) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/frsfz.png" alt="" class="img"><div class="cont"><span class="left">电话:</span><span class="right">'+check(data.tel)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">民族:</span><span class="right">'+check(data.familyName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">所属党支部:</span><span class="right">'+check(data.orgDeptName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/mc.png" alt="" class="img"><div class="cont"><span class="left">党籍状态:</span><span class="right">'+check(data.partyState) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img">' +
                    '<div class="cont"><span class="left">党员信息类别:</span>' +
                    '<span class="right names">'+ function(){
//                                if(data.memberTypeTo=001){
//                                    return '老干部党员,'
//                                }else if(data.memberTypeTo=002){
//                                    return '退休党员,'
//                                }else if(data.memberTypeTo=003){
//                                    return '在职党员,'
//                                }else if(data.memberTypeTo=004){
//                                    return '困难党员,'
//                                }else if(data.memberTypeTo=005){
//                                    return '非公党员,'
//                                }else if(data.memberTypeTo=006){
//                                    return '流动党员,'
//                                }else{
//                                    return '其他党员'
//                                }
                        var strs;
                        if(data.memberTypeTo !=""&&data.memberTypeTo != undefined){
                            strs=data.memberTypeTo.split(",");
                            var strOne=""
                            for(var i=0;i<strs.length;i++){
                                if(strs[i] == '001'){
                                    strOne+='老干部党员,'
                                }else if(strs[i] == '002'){
                                    strOne+='退休党员,'
                                }else if(strs[i] == '003'){
                                    strOne+='在职党员,'
                                }else if(strs[i] == '004'){
                                    strOne+='困难党员,'
                                }else if(strs[i] == '005'){
                                    strOne+='非公党员,'
                                }else if(strs[i] == '006'){
                                    strOne+='流动党员,'
                                }else{
                                    strOne+='其他党员,'
                                }
                            }
                            return strOne;
                        }





                    }()+'</span>' +
                    '</div>' +
                    '</li>' +
                    '</ul>'
                })
            })
        }else if(type == 3){ //宣传阵地
            $.get('/position/getActivityById',{pId:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['宣传阵地', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">名称:</span><span class="right">'+check(data.name) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">位置:</span><span class="right">'+check(data.place)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">社区名称:</span><span class="right">'+check(data.orgDeptName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/mc.png" alt="" class="img"><div class="cont"><span class="left">用途:</span><span class="right">'+check(data.application) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 4){ //油烟在线
            $.get('/TrashDetectionController/trdeSelect',{tinid:id,page:1, pageSize:10, useFlag:true},function(res){
                var data= res.obj[0];

                layer.open({
                    type:1,
                    title: ['油烟在线监测', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">名称:</span><span class="right">'+check(data.enterpriseName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">位置:</span><span class="right">'+check(data.xydz)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">电话:</span><span class="right">'+check(data.tel) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/mc.png" alt="" class="img"><div class="cont"><span class="left">设备状态:</span><span class="right">'+check(data.menke) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 5){ //微型站点
            $.get('/TrashMiniatureController/trminSelect',{mid:id,page:1,pageSize:10,useFlag:true},function(res){
                var data= res.obj[0];

                layer.open({
                    type:1,
                    title: ['微型站点监测', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">社区名称:</span><span class="right">'+check(data.deptName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">位置:</span><span class="right">'+check(data.tdw)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">联系人:</span><span class="right">'+check(data.userId) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">电话:</span><span class="right">'+check(data.tel) +'</span></div></li>' +

                    '</ul>'
                })
            })
        }else if(type == 6){ //餐饮
            $.get('/enCaterParameter/selectById',{cid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['餐饮企业', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">单位:</span><span class="right">'+check(data.unit) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">位置:</span><span class="right">'+check(data.unitAddress)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">所属社区:</span><span class="right">'+check(data.codeName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">联系人:</span><span class="right">'+check(data.cantact) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">电话:</span><span class="right">'+check(data.phoneNumber) +'</span></div></li>' +

                    '</ul>'
                })
            })
        }else if(type == 7){ //开墙打洞
            $.get('/enOpenHole/selectById',{oid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['开墙打洞', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">台账编号:</span><span class="right">'+check(data.parameterNum) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">位置:</span><span class="right">'+check(data.detailAddress)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">所属街道:</span><span class="right">'+check(data.streetRoad) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">具体街道号码:</span><span class="right">'+check(data.streetNum) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 8){ //开墙打洞(经营)
            $.get('/enHoleBusiness/selectById',{bid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['开墙打洞（经营）', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '400px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">房屋所有者姓名:</span><span class="right">'+check(data.houseOwnName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">房屋地址:</span><span class="right">'+check(data.homeAddress)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">居委会名称:</span><span class="right">'+check(data.committeeName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">经营者姓名:</span><span class="right">'+check(data.operatorName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/mc.png" alt="" class="img"><div class="cont"><span class="left">经营项目:</span><span class="right">'+check(data.bussinessProject) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 9){ //汽修企业
            $.get('/enAutoCompany/selectById',{cid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['汽修企业', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">单位:</span><span class="right">'+check(data.unit) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">单位地址:</span><span class="right">'+check(data.unitAddress)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">联系人:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contactNum) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 10){ //在建工地
            $.get('/enConstructionSite/selectById',{sid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['在建工地', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '500px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">工程名称:</span><span class="right">'+check(data.projectName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">建设工程地址:</span><span class="right">'+check(data.projectAddress    )+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.responsiblePerson) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contactNum) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 11){ //门前三包
            $.get('/enDoorThree/selectById',{tid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['门前三包', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '400px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">牌匾名称:</span><span class="right">'+check(data.plaqueName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">地址:</span><span class="right">'+check(data.address)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">经营者姓名:</span><span class="right">'+check(data.operatorName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">联系电话:</span><span class="right">'+check(data.phoneNumber) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 12){ //无证无照
            $.get('/enUnlicense/selectById',{mid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['无证无照', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">名称或姓名:</span><span class="right">'+check(data.name) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">经营地址:</span><span class="right">'+check(data.businessAddress)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">经营者姓名:</span><span class="right">'+check(data.operateName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">经营者电话:</span><span class="right">'+check(data.operatePhone) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 13){ //出租屋
            $.get('/illeralrent/getRentById',{id:id},function(res){
                var data= res.data;

                layer.open({
                    type:1,
                    title: ['出租房', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">所属社区村:</span><span class="right">'+check(data.gridName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newjgy.png" alt="" class="img"><div class="cont"><span class="left">所属街、镇:</span><span class="right">'+check(data.subStreet) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">楼门房号:</span><span class="right">'+check(data.buildingDoor)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">房屋来源:</span><span class="right">'+check(data.houseSource) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">居住人数:</span><span class="right">'+check(data.personNumber) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 14){ //社区委员会
            $.get('/esCommittee/selectById',{cid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['社区委员会', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.directorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.createUser) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 15){ //车棚
            $.get('/esCarport/selectById',{pid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['车棚', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.directorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.createUser) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 16){ //裙房布控点
            $.get('/esGroupControl/selectById',{tid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['群防群治布控点', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.directorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.createUser) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 17){ //巡逻
            $.get('/esPoliceStation/selectById',{sid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['巡逻警务站点', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.directorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.createUser) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 18){ //电子显示屏
            $.get('/esDisplay/selectById',{eid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['电子显示屏', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.directorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.createUser) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 19){ //电子显示屏
            $.get('/esMonitorSystem/selectById',{mid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['视频监控系统', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.directorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.createUser) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 20){ //物业
            $.get('/esPropertyCompany/selectById',{pid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['物业公司', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.directorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.createUser) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 21){ //物业
            $.get('/esSubstation/selectById',{bid:id},function(res){
                var data= res.object;

                layer.open({
                    type:1,
                    title: ['变电站', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">主管部门:</span><span class="right">'+check(data.directorDept) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">具体位置:</span><span class="right">'+check(data.location)+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">负责人:</span><span class="right">'+check(data.createUser) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">联系方式:</span><span class="right">'+check(data.contact) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 23){ //布控点位
            $.get('/OrgDispatchedController/selectList',{odId:id},function(res){
                var data= res.obj[0];

                layer.open({
                    type:1,
                    title: ['布控点位', 'background-color:#2b7fe0;color:#fff;'],
                    area: ['350px', '320px'],
                    btn: 0,
                    content:'<ul>' +
                    '<li class="clearfx"><img src="/img/newsq.png" alt="" class="img"><div class="cont"><span class="left">所属社区:</span><span class="right">'+check(data.gridName) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newlocation.png" alt="" class="img"><div class="cont"><span class="left">布控级别:</span><span class="right">'+function(){
                        if(data.dispatchedStatc ==1){
                            return '一级超常'
                        }else if(data.dispatchedStatc ==2){
                            return '一级布控'
                        }else if(data.dispatchedStatc ==3){
                            return '二级布控'
                        }else{
                            return '三级布控'
                        }
                    }()+'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newxcy.png" alt="" class="img"><div class="cont"><span class="left">点位数:</span><span class="right">'+check(data.idsum) +'</span></div></li>' +
                    '<li class="clearfx"><img src="/img/newtel.png" alt="" class="img"><div class="cont"><span class="left">点位位置:</span><span class="right">'+check(data.address) +'</span></div></li>' +
                    '</ul>'
                })
            })
        }else if(type == 22){ //企业信息
            $.get('/fixForm/selectByListFixFromId',{type:name,fixFromId:id},function (json){
                if(json.flag){
                    var jsonData=json.data;//jsonData.einfoName
                    console.log(name)

                    if(name == 1){
                        var qymc = jsonData.unitName;
                        var gszch = jsonData.businessRegistrationNo;
                        var frxm = jsonData.legalRepresentative;
                        var frdh = jsonData.mobilePhone;
                        var qyxz = '一般安全生产法人单位';
                        var qyzt = jsonData.codeName;
                    }else if(name == 2){
                        var qymc = jsonData.unitName;
                        var gszch = jsonData.businessRegistrationNo;
                        var frxm = jsonData.legalRepresentative;
                        var frdh = jsonData.mobilePhone;
                        var qyxz = '小规模安全生产法人单位';
                        var qyzt = jsonData.codeName;
                    }else if(name == 3){
                        var qymc = jsonData.opName;
                        var gszch = jsonData.bsLicenseRegist;
                        var frxm = jsonData.lightnDetect;
                        var frdh = jsonData.mobPh;
                        var qyxz = '大型安全生产个体工商户';
                        var qyzt = jsonData.codeName;
                    }else if(name == 4){
                        var qymc = jsonData.opName;
                        var gszch = jsonData.bsLicenseRegist;
                        var frxm = jsonData.lightnDetect;
                        var frdh = jsonData.mobPh;
                        var qyxz = '小型安全生产个体工商户';
                        var qyzt = jsonData.codeName;
                    }else if(name == 5){
                        var qymc = jsonData.itemName;
                        var gszch = jsonData.itemLicence;
                        var frxm = jsonData.itemOrgusername;
                        var frdh = jsonData.itemOrgtel;
                        var qyxz = '在建工程项目';
                        var qyzt = jsonData.codeName;
                    }
                    layer.open({
                        type:1,
                        title: ['企业信息', 'background-color:#2b7fe0;color:#fff;'],
                        area: ['350px', '420px'],
                        btn: 0,
                        content: '<ul class="spantextbox spantextboxTwo spantextboxTwos" style="padding-top:0;width:100%;height:100%;"> ' +
                        '<li class="clearfx" style="position: relative;padding-left: 0px;"><img src="/img/mc.png" class="img" alt="" ><div class="cont"><span class="left">企业名称：</span><span class="right">'+ qymc +'</span></div></li>' +
                        ' <li class="clearfx" style="position: relative;padding-left: 0px;"><img src="/img/newsq.png" class="img" alt="" ><div class="cont"><span class="left">工商注册号：</span><span class="right" style="left: 108px">'+ gszch +'</span></div></li>' +
                        '<li class="clearfx" style="position: relative;padding-left: 0px;"><img src="/img/fr.png" class="img" alt="" ><div class="cont"><span class="left">法人姓名：</span><span class="right">'+ frxm +'</span></div></li> ' +
                        '<li class="clearfx" style="position: relative;padding-left: 0px;"><img src="/img/frsfz.png" class="img" alt="" ><div class="cont"><span class="left">法人电话：</span><span class="right">'+ frdh +'</span></div></li> '+
                        '<li class="clearfx" style="position: relative;padding-left: 0px;"><img src="/img/mc.png" class="img" alt="" ><div class="cont"><span class="left">企业状态：</span><span class="right">'+ qyzt +'</span></div></li> ' +
                        ' <li class="clearfx" style="position: relative;padding-left: 0px;"><img src="/img/mc.png" class="img" alt="" ><div class="cont"><span class="left">企业性质：</span><span class="right" style="width: 180px;left: 93px;">'+ qyxz +'</span></div></li>' +
                        '</ul>',
                    })
//                    var height = $('.layui-layer-content').height() + 48;
//                    $('.layui-layer-content').height(height);
                }
            },'json')
        }
    })




    var maps={
        party:function(){//组织架构
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/orgDepartment/selectSum',
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].gridLocation != undefined && data[i].gridLocation !=""){
                            overlays.push(data[i])
                        }
                    }
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/dang.png", new BMap.Size(119,43));
                        var Icon ="../../img/map/dangBack.png"
                        var num=overlays[j].gridLocation.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        point,img,name,id,con,grid,type,title

                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].orgOrgAdmin,overlays[j].orgDeptId ,overlays[j].orgDeptName+'党支部','',1,overlays[j].orgDeptName+'党支部' );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
//                        addMarker(point,myIcon)
                    }




                }
            });

        },
        dang:function(){  //党员
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/OrgPartyMember/selectList',
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].addressLocation != undefined && data[i].addressLocation !=""){
                            overlays.push(data[i])
                        }
                    }
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/user.png", new BMap.Size(119,43));
                        var Icon = "../../img/map/dangBack.png"
                        var num=overlays[j].addressLocation.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)

                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].name,overlays[j].opId ,'党员'+overlays[j].name,overlays[j].orgDeptName,2,'党员'+overlays[j].name );
                        map.addOverlay(myCompOverlay);//将标注添加到地图中


                    }
                }
            });
        },
        Propaganda:function(){ //宣传阵地
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/position/getActivityList',
                data:{
                    orgDeptId:1,
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].remark2 != undefined && data[i].remark2 !=""){
                            overlays.push(data[i])
                        }
                    }
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/xuan.png", new BMap.Size(119,43));
                        var Icon = "../../img/map/xuanBack.png"
                            var num=overlays[j].remark2.split(',')
                            var x=parseFloat(num[0])
                            var y=parseFloat(num[1])
                            var point = new BMap.Point(x,y)
//                        var convertor = new BMap.Convertor();
//                            convertor.translate(point,1,5,addMarker(point,myIcon))
//                            addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].name,overlays[j].pId ,overlays[j].name,overlays[j].orgDeptName,3,overlays[j].name);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中

                    }

                }

            })
        },
        oil:function(){ //油烟在线监测
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/TrashDetectionController/trdeSelect',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].gridLocation != undefined && data[i].gridLocation !=""){
                            overlays.push(data[i])
                        }
                    }
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/oil.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/oil.png'
                        var num=overlays[j].gridLocation.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].enterpriseName,overlays[j].tinid ,'','',4,overlays[j].enterpriseName);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        weiXing:function(){ //微型站点
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/TrashMiniatureController/trminSelect',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].gridLocation != undefined && data[i].gridLocation !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/wei.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/wei.png'
                        var num=overlays[j].gridLocation.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].userId,overlays[j].mid ,'',overlays[j].deptName,5,overlays[j].deptName);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }
                }
            })
        },
        eat:function(){ //餐饮企业
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/enCaterParameter/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].s1 != undefined && data[i].s1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/eat.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/noZi/eat.png'
                        var num=overlays[j].s1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,overlays[j].cantact,overlays[j].cid ,overlays[j].unit,overlays[j].gridId,6,overlays[j].unit);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        openWall:function(){ //开墙打洞
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/enOpenHole/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].s1 != undefined && data[i].s1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/open.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/open.png'
                        var num=overlays[j].s1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].oid ,'',overlays[j].streetRoad,7,overlays[j].streetRoad);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        openWallMan:function(){ //开墙打洞经营
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/enHoleBusiness/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].str1 != undefined && data[i].str1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/openMan.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/openMan.png'
                        var num=overlays[j].str1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].bid ,'',overlays[j].committeeName,8,overlays[j].committeeName);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        car:function(){ //汽修企业
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/enAutoCompany/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].remark1 != undefined && data[i].remark1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/cxiu.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/noZi/xiu.png'
                        var num=overlays[j].remark1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].cid ,overlays[j].unit,overlays[j].unit,9,overlays[j].unit);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        build:function(){ //在建工地
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/enConstructionSite/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].no1 != undefined && data[i].no1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/build.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/build.png'
                        var num=overlays[j].no1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].sid ,'',overlays[j].projectName,10,overlays[j].projectName);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        door:function(){ //门前三包
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/enDoorThree/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].t1 != undefined && data[i].t1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/door.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/noZi/door.png'
                        var num=overlays[j].t1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].tid ,overlays[j].plaqueName,overlays[j].plaqueName,11,overlays[j].plaqueName);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        unlicensed:function(){ //无证无照
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/enUnlicense/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].gridLocation != undefined && data[i].gridLocation !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/unlicensed.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/unlicensed.png'
                        var num=overlays[j].gridLocation.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].mid ,'',overlays[j].name,12,overlays[j].name);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        flow:function(){ //流动人口
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/illeralrent/getList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.data;
                    for(var i=0;i<data.length;i++){
                        if(data[i].gridLocation != undefined && data[i].gridLocation !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/home.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/home.png'
                        var num=overlays[j].gridLocation.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].rentId ,'',overlays[j].gridName,13,overlays[j].gridName);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        grid:function(){ //社区委员会
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/esCommittee/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].c1 != undefined && data[i].c1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/grid.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/noZi/grid.png'
                        var num=overlays[j].c1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].cid ,overlays[j].location,'',14,overlays[j].location);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        carP:function(){ //车棚
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/esCarport/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].p1 != undefined && data[i].p1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/car.png", new BMap.Size(119,43));
                        var Icon='../../img/map/noZi/car.png'
                        var num=overlays[j].p1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].pid ,overlays[j].location,'',15,overlays[j].location);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        all:function(){ //裙房布控点
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/esGroupControl/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].t1 != undefined && data[i].t1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/bukong.png", new BMap.Size(119,43));
                        var Icon= '../../img/map/noZi/bukong.png'
                        var num=overlays[j].t1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].tid ,overlays[j].location,'',16,overlays[j].location);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        xunluo:function(){ //巡逻
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/esPoliceStation/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].s1 != undefined && data[i].s1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/xun.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/noZi/xun.png'
                        var num=overlays[j].s1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].sid ,overlays[j].location,'',17,overlays[j].location);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        dianzi:function(){ //电子显示屏
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/esDisplay/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].e1 != undefined && data[i].e1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/show.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/noZi/show.png'
                        var num=overlays[j].e1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].eid ,overlays[j].location,'',18,overlays[j].location);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        video:function(){ //视频监控系统
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/esMonitorSystem/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].m1 != undefined && data[i].m1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/she.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/noZi/video.png'
                        var num=overlays[j].m1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].mid ,overlays[j].location,'',19,overlays[j].location);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        wuye:function(){ //物业公司
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/esPropertyCompany/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].p1 != undefined && data[i].p1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/wuye.png", new BMap.Size(119,43));
                        var Icon='../../img/map/noZi/wuye.png'
                        var num=overlays[j].p1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].pid ,overlays[j].location,'',20,overlays[j].location);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        bianDian:function(){ //变电站
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/esSubstation/queryList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].b1 != undefined && data[i].b1 !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/eletic.png", new BMap.Size(119,43));
                        var Icon = '../../img/map/noZi/bukong.png'
                        var num=overlays[j].b1.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].bid ,overlays[j].location,'',21,overlays[j].location);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                    }

                }

            })
        },
        bukong:function(){ //布控点位
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/OrgDispatchedController/selectList',
                data:{
                    page:1,
                    pageSize:10,
                    useFlag:false
                },
                dataType:'json',
                success:function(res){
                    var data=res.obj;
                    for(var i=0;i<data.length;i++){
                        if(data[i].addressLocation != undefined && data[i].addressLocation !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var myIcon = new BMap.Icon("../../img/map/eletic.png", new BMap.Size(119,43));
                        if(overlays[j].dispatchedStatc ==1){
                            var Icon = '../../img/map/noZi/show.png'
                            var num=overlays[j].addressLocation.split(',')
                            var x=parseFloat(num[0])
                            var y=parseFloat(num[1])
                            var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                            //                        point,img,name,id,con,grid,type,title
                            var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].odId ,overlays[j].gridName,'',23,overlays[j].gridName);
                            map.addOverlay(myCompOverlay);//将标注添加到地图中

                        }else if(overlays[j].dispatchedStatc ==2){
                            var Icon = '../../img/map/noZi/xiu.png'
                            var num=overlays[j].addressLocation.split(',')
                            var x=parseFloat(num[0])
                            var y=parseFloat(num[1])
                            var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                            //                        point,img,name,id,con,grid,type,title
                            var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].odId ,overlays[j].gridName,'',23,overlays[j].gridName);
                            map.addOverlay(myCompOverlay);//将标注添加到地图中
                        }else if(overlays[j].dispatchedStatc ==3){
                            var Icon = '../../img/map/noZi/wuye.png'
                            var num=overlays[j].addressLocation.split(',')
                            var x=parseFloat(num[0])
                            var y=parseFloat(num[1])
                            var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                            //                        point,img,name,id,con,grid,type,title
                            var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].odId ,overlays[j].gridName,'',23,overlays[j].gridName);
                            map.addOverlay(myCompOverlay);//将标注添加到地图中
                        }else if(overlays[j].dispatchedStatc ==4){
                            var Icon = '../../img/map/noZi/bukong.png'
                            var num=overlays[j].addressLocation.split(',')
                            var x=parseFloat(num[0])
                            var y=parseFloat(num[1])
                            var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                            //                        point,img,name,id,con,grid,type,title
                            var myCompOverlay = new ComplexCustomOverlay(point,Icon,'',overlays[j].odId ,overlays[j].gridName,'',23,overlays[j].gridName);
                            map.addOverlay(myCompOverlay);//将标注添加到地图中
                        }



                    }

                }

            })
        },
        qiye:function(type){ //企业信息
            var overlays = [];
            map.getPanes().labelPane.innerHTML=''
            $.ajax({
                url:'/fixForm/selectUnionAll?itemType='+type,
                dataType:'json',
                success:function(res){
                    var data=res.datas;
                    for(var i=0;i<data.length;i++){
                        if(data[i].zuobiao!='' != undefined && data[i].zuobiao !=""){
                            overlays.push(data[i])
                        }
                    }
//                    console.log(overlays)
                    for(var j=0;j<overlays.length;j++){
                        var type = overlays[j].biaozhi;
                        var einfoStuts = overlays[j].dengji;
                        var strname='';
                        var imgs=''
                        if(type=='1'){
                            strname='一般法人单位';
                            if(einfoStuts=='04'){
                                imgs = '/img/grid/farenyanzhong1.png'
                            }else if(einfoStuts=='03'){
                                imgs = '/img/grid/yibanzhenggai1.png';
                            }else if(einfoStuts=='02'){
                                imgs = '/img/grid/farenYiban1.png';
                            }else {
                                imgs = '/img/grid/yibanzhengchang1.png';
                            }
                        }else if(type=='2'){
                            strname='小规模法人单位';
                            if(einfoStuts=='04'){
                                imgs = '/img/grid/xiaofarenyanzhong1.png'
                            }else if(einfoStuts=='03'){
                                imgs = '/img/grid/xiaofarenzhenggai1.png';
                            }else if(einfoStuts=='02'){
                                imgs = '/img/grid/xiguimoYiban1.png';
                            }else {
                                imgs = '/img/grid/xiaofarenzhengchang1.png';
                            }
                        }else if(type=='3'){
                            strname='大型个体工商户';
                            if(einfoStuts=='04'){
                                imgs = '/img/grid/dagetiyanzhog1.png'
                            }else if(einfoStuts=='03'){
                                imgs = '/img/grid/xiaogetizhenggai1.png';
                            }else if(einfoStuts=='02'){
                                imgs = '/img/grid/daxingYiban1.png';
                            }else{
                                imgs = '/img/grid/xiaogetizhengchang1.png';
                            }
                        }else if(type=='4'){
                            strname='小型个体工商户';
                            if(einfoStuts=='04'){
                                imgs = '/img/grid/xiaogetiyanzhong1.png'
                            }else if(einfoStuts=='03'){
                                imgs = '/img/grid/xiaogetizhenggai1.png';
                            }else if(einfoStuts=='02'){
                                imgs = '/img/grid/xiaoxingYiban1.png';
                            } else{
                                imgs = '/img/grid/xiaogetizhengchang1.png';
                            }
                        }else if(type=='5'){
                            strname='在建工程项目';
                            if(einfoStuts=='04'){
                                imgs = '/img/grid/jianshezhongyanzhong1.png'
                            }else if(einfoStuts=='03'){
                                imgs = '/img/grid/jianshezhongzhenggai1.png';
                            }else if(einfoStuts=='02'){
                                imgs = '/img/grid/zaijianYiban1.png';
                            }else {
                                imgs = '/img/grid/jianshezhongzhengchang1.png';
                            }
                        }

                        var myIcon = new BMap.Icon(imgs, new BMap.Size(119,43));
                        var num=overlays[j].zuobiao.split(',')
                        var x=parseFloat(num[0])
                        var y=parseFloat(num[1])
                        var point = new BMap.Point(x,y)
//                        addMarker(point,myIcon)
                        //                        point,img,name,id,con,grid,type,title
                        var myCompOverlay = new ComplexCustomOverlay(point,imgs,type,overlays[j].zhujian ,'','',22,overlays[j].name);
                        map.addOverlay(myCompOverlay);//将标注添加到地图中
                        $('.outer').css({width:'30px',height:'30px'})
                    }

                }

            })
        },

    }
    if(type == 2){
        $('.party').show();
        $('.city').hide();
        $('.sheshi').hide();
        $('.taizang').hide();
        $('.zongzhi').hide();
        $('.basic').hide();
        $('.safe').hide();
        $('.qiyeLei').hide();
        map.clearOverlays();
        maps.party();
        draw();
    }else if(type == 3){
        $('.party').hide();
        $('.city').show();
        $('.sheshi').show();
        $('.taizang').hide();
        $('.zongzhi').hide();
        $('.basic').hide();
        $('.safe').hide();
        $('.qiyeLei').hide();
        map.clearOverlays();
        maps.oil();
        draw();
    }else if(type == 4){
        $('.party').hide();
        $('.city').hide();
        $('.sheshi').hide();
        $('.taizang').hide();
        $('.zongzhi').show();
        $('.basic').hide();
        $('.safe').hide();
        $('.qiyeLei').hide();
        map.clearOverlays();
        maps.flow();
        draw();
    }else if(type == 5){
        $('.party').hide();
        $('.city').hide();
        $('.sheshi').hide();
        $('.taizang').hide();
        $('.zongzhi').hide();
        $('.basic').hide();
        $('.safe').show();
        $('.qiyeLei').show();
        map.clearOverlays();
        maps.qiye('01');
        draw();
    }
    $('.party li').click(function(){//智慧党建
        $('.sheshi').hide();
        $('.taizang').hide();
        $('.basic').hide();
        $('.qiyeLei').hide();
        $('.party span').removeClass('select')
        $(this).find('span').addClass('select');
        if($(this).attr('data-type')==0){
            map.clearOverlays();
            maps.party();
            draw();
        }else if($(this).attr('data-type')==1){
            map.clearOverlays();
            maps.Propaganda();
            draw();
        } else if($(this).attr('data-type')==2){
            map.clearOverlays();
            maps.dang();
            draw();
        }

    })
    $('.city li').click(function(){//智慧城建

        $('.city span').removeClass('select')
        $(this).find('span').addClass('select');
        if($(this).attr('data-type')==3){
            $('.sheshi').show();
            $('.taizang').hide();
            $('.basic').hide();
            $('.qiyeLei').hide();
            map.clearOverlays();
            maps.oil();
            draw();
        }else if($(this).attr('data-type')==4){
            $('.sheshi').hide();
            $('.taizang').show();
            $('.basic').hide();
            $('.qiyeLei').hide();
            map.clearOverlays();
            maps.eat();
            draw();
        }

    })
    $('.zongzhi li').click(function(){//智慧综治

        $('.zongzhi span').removeClass('select')
        $(this).find('span').addClass('select');
        if($(this).attr('data-type')==0){
            $('.sheshi').hide();
            $('.taizang').hide();
            $('.basic').hide();
            $('.qiyeLei').hide();
            map.clearOverlays();
            maps.flow();
            draw();
        }else if($(this).attr('data-type')==1){
            $('.sheshi').hide();
            $('.taizang').hide();
            $('.basic').show();
            $('.qiyeLei').hide();
            map.clearOverlays();
            maps.grid();
            draw();
        }else if($(this).attr('data-type')==2){
            $('.sheshi').hide();
            $('.taizang').hide();
            $('.basic').hide();
            $('.qiyeLei').hide();
            map.clearOverlays();
            maps.bukong();
            draw();
        }

    })
    $('.safe li').click(function(){//智慧安全
            $('.sheshi').hide();
            $('.taizang').hide();
            $('.basic').hide();
           $('.qiyeLei').show();
            map.clearOverlays();
            maps.qiye('01');
        draw();
    })
    $('.sheshi li').click(function(){
        $(this).siblings('li').removeClass('active');
        $(this).addClass('active')
        if($(this).attr('data-type') == 01){
            $('.sheshi').show();
            $('.taizang').hide();
            $('.basic').hide();
            $('.qiyeLei').hide();
            map.clearOverlays();
            maps.oil();
            draw();
        }else if($(this).attr('data-type') == 02){
            $('.sheshi').show();
            $('.taizang').hide();
            $('.basic').hide();
            $('.qiyeLei').hide();
            map.clearOverlays();
            maps.weiXing();
            draw();
        }
    })
    $('.taizang li').click(function(){
        $(this).siblings('li').removeClass('active');
        $(this).addClass('active')
        $('.basic').hide();
        $('.qiyeLei').hide();
        if($(this).attr('data-type') == 01){
            $('.sheshi').hide();
            $('.taizang').show();

            map.clearOverlays();
            maps.eat();
            draw();

        }else if($(this).attr('data-type') == 02){
            $('.sheshi').hide();
            $('.taizang').show();
            map.clearOverlays();
            maps.openWall();
            draw();
        }else if($(this).attr('data-type') == 03){
            $('.sheshi').hide();
            $('.taizang').show();
            map.clearOverlays();
            maps.openWallMan();
            draw();
        }else if($(this).attr('data-type') == 04){
            $('.sheshi').hide();
            $('.taizang').show();
            map.clearOverlays();
            maps.car();
            draw();
        }else if($(this).attr('data-type') == 05){
            $('.sheshi').hide();
            $('.taizang').show();
            map.clearOverlays();
            maps.build();
            draw();
        }else if($(this).attr('data-type') == 06){
            $('.sheshi').hide();
            $('.taizang').show();
            map.clearOverlays();
            maps.door();
            draw();

        }else if($(this).attr('data-type') == 07){
            $('.sheshi').hide();
            $('.taizang').show();
            map.clearOverlays();
            maps.unlicensed();
            draw();
        }
    })
    $('.basic li').click(function(){
        $(this).siblings('li').removeClass('active');
        $(this).addClass('active')
        $('.sheshi').hide();
        $('.taizang').hide();
        $('.basic').show();
        $('.qiyeLei').hide();
        if($(this).attr('data-type') == 01){
            map.clearOverlays();
            maps.grid();
            draw();
        }else if($(this).attr('data-type') == 02){

            map.clearOverlays();
            maps.carP();
            draw();
        }else if($(this).attr('data-type') == 03){

            map.clearOverlays();
            maps.all();
            draw();
        }else if($(this).attr('data-type') == 04){

            map.clearOverlays();
            maps.xunluo();
            draw();
        }else if($(this).attr('data-type') == 05){

            map.clearOverlays();
            maps.dianzi();
            draw();
        }else if($(this).attr('data-type') == 06){

            map.clearOverlays();
            maps.video();
            draw();
        }else if($(this).attr('data-type') == 07){

            map.clearOverlays();
            maps.wuye();
            draw();

        }else if($(this).attr('data-type') == 08){

            map.clearOverlays();
            maps.bianDian();
            draw();
        }
    })
    $('.qiyeLei li').click(function(){
        $(this).siblings('li').removeClass('active');
        $(this).addClass('active')
        $('.sheshi').hide();
        $('.taizang').hide();
        $('.basic').hide();
        $('.qiyeLei').show();
        if($(this).attr('data-type') == '01'){
            map.clearOverlays();
            maps.qiye('01');
            draw();

        }else if($(this).attr('data-type') == '02'){

            map.clearOverlays();
            maps.qiye('02');
            draw();
        }else if($(this).attr('data-type') == '03'){

            map.clearOverlays();
            maps.qiye('03');
            draw();
        }else if($(this).attr('data-type') == '04'){

            map.clearOverlays();
            maps.qiye('04');
            draw();
        }
    })

</script>
</body>
</html>
